package org.example.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.dao.User;

@Mapper
public interface UserMapper {

    @Select("select * from user where id=#{id}")
    User getUserById(User user);
    @Select("select * from user where username=#{username}")
    User getUserByUsername(User user);

    @Insert("insert into user(username, password) value (#{username},#{password})")
    Integer register(User user);

    Integer updateUser(User user);
}
